<template>
  <div>
    <!-- <mt-swipe :auto="3000">
      <mt-swipe-item v-for="item of lunboicon" :key="item.id">
        <img :src="item.img" />
      </mt-swipe-item>
    </mt-swipe> -->
    <!-- istrue用来判断类名是否为true -->
    <swiper :lunbolist="lunbolist" :istrue="true"></swiper>
    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/newslist">
          <span class="mui-icon iconfont iconstyle">&#xe610;</span>
          <div class="mui-media-body">新闻资讯</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/photolist">
          <span class="mui-icon iconfont iconstyle">&#xe63b;</span>
          <div class="mui-media-body">图片分享</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/shoplist">
          <span class="mui-icon iconfont iconstyle">&#xe86b;</span>
          <div class="mui-media-body">商品购买</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon iconfont iconstyle">&#xe651;</span>
          <div class="mui-media-body">留言反馈</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon iconfont iconstyle">&#xe707;</span>
          <div class="mui-media-body">视频专区</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon iconfont iconstyle">&#xe61a;</span>
          <div class="mui-media-body">联系我吧</div>
        </a>
      </li>
    </ul>
  </div>
</template>

<script>
import swiper from '../public/swiper'
import { Toast } from "mint-ui";
export default {
  name: "TabbarHome",
  data() {
    return {
      show:0,
      lunbolist: [
         {
            "id": 1,
            "url": "http://www.itcast.cn/subject/phoneweb/index.html",
            "img": "http://img2.imgtn.bdimg.com/it/u=4142120595,2883957261&fm=26&gp=0.jpg"
        },
        {
            "id": 2,
            "url": "http://www.itcast.cn/subject/phoneweb/index.html",
            "img": "http://img5.imgtn.bdimg.com/it/u=3389759620,4069691363&fm=26&gp=0.jpg"
        },
        {
            "id": 3,
            "url": "http://www.itcast.cn/subject/phoneweb/index.html",
            "img": "http://img2.imgtn.bdimg.com/it/u=3903281946,235156658&fm=26&gp=0.jpg"
        }
      ]//轮播数据
    };
  },
  created() {
    // ajax请求都是在这个钩子里请求的
    // this.getData();
  },
  methods: {
    getData() {
      // this.$http.get("api/getlunbo").then(result => {
      //   // console.log(result.body);
      //   var data = result.body;
      //   if (data.status === 0) {
      //     // Toast('请求数据成功');
      //     this.lunbolist = data.message;
      //   } else {
      //     Toast("请求数据失败");
      //   }
      // });
    }
  },
  components:{
    swiper
  }
};
</script>

<style lang="scss" scoped>

.mui-grid-view.mui-grid-9 {
  background-color: #fff;
  border: none;
  .mui-table-view-cell {
    border: none;
    .iconstyle {
      font-size: 1rem;
      color: #6b1ae6;
    }
    .mui-media-body {
      font-size: 0.28rem;
    }
  }
}
</style>